//
//  CheckInView.h
//  playSerengetiMobile1
//
//  Created by Lita Gratrix on 11/10/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Team.h"
#import "Location.h"
#import "playSerengetiMobile1AppDelegate.h"
#import "SerengetiCLController.h"


@interface CheckInView : UIViewController <UIPickerViewDelegate, UIPickerViewDataSource> {

	NSMutableArray *nearbyLocations;
	NSMutableArray *teams;
	
	NSInteger selectedLocation;
	NSInteger selectedTeam;
	
	UILabel *selectedLocationLabel;
	UILabel *selectedTeamLabel;
	
	NSMutableData *responseData;
	
	UIPickerView *checkInPicker;
	
	SerengetiCLController *locationController;
	playSerengetiMobile1AppDelegate *appDelegate;	
}

@property (nonatomic, retain) NSMutableArray *nearbyLocations;
@property (nonatomic, retain) NSMutableArray *teams;

@property (nonatomic, readwrite) NSInteger selectedLocation;
@property (nonatomic, readwrite) NSInteger selectedTeam;

@property (nonatomic, retain) IBOutlet UILabel *selectedLocationLabel;
@property (nonatomic, retain) IBOutlet UILabel *selectedTeamLabel;

@property (nonatomic, retain) IBOutlet UIPickerView *checkInPicker;

@property (nonatomic, retain) SerengetiCLController *locationController;
@property (nonatomic, retain) playSerengetiMobile1AppDelegate *appDelegate;

- (id)initWithTeams:(NSMutableArray *)teamsArg andLocations:(NSMutableArray *)nearbyLocationsArg;

- (void)storeSelectedLocation:(NSInteger)index;
- (void)storeSelectedTeam:(NSInteger)index;

- (void)createPicker;
- (CGRect)pickerFrameWithSize:(CGSize)size;

- (void)checkInWithSelection:(id)sender;

@end
